import request from '@/utils/request'

// 创建第三方API调用日志
export function createExternalLog(data) {
  return request({
    url: '/system/external-log/create',
    method: 'post',
    data: data
  })
}

// 更新第三方API调用日志
export function updateExternalLog(data) {
  return request({
    url: '/system/external-log/update',
    method: 'put',
    data: data
  })
}

// 删除第三方API调用日志
export function deleteExternalLog(id) {
  return request({
    url: '/system/external-log/delete?id=' + id,
    method: 'delete'
  })
}

// 获得第三方API调用日志
export function getExternalLog(id) {
  return request({
    url: '/system/external-log/get?id=' + id,
    method: 'get'
  })
}

// 获得第三方API调用日志分页
export function getExternalLogPage(query) {
  return request({
    url: '/system/external-log/page',
    method: 'get',
    params: query
  })
}

// 导出第三方API调用日志 Excel
export function exportExternalLogExcel(query) {
  return request({
    url: '/system/external-log/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
